/*
 * LOG IN PAGE
 */

 .login-page {
    display: flex; /* Note: the login page contents is hidden before this property is applied  */
    height: 100%;
    flex-direction: column;
    justify-content: center;
}

.login-page > div {
    padding-top: 0 !important;
    padding-bottom: 20vh;
}

.login-page h1 {
    margin-bottom: .5em;
    font-weight: 300;
    color: var(--muted-text-color);
}

.login-page .form-group {
    margin-top: 8px;
}

.login-page .alert {
    margin: 0;
    border: unset;
    padding: 8px 0 0 0;
    font-size: .85em;
    color: var(--dropdown-item-icon-destructive-color) !important;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #757575;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.google-login-btn:hover {
    background-color: #f5f5f5;
}
.google-login-btn img {
    margin-inline-end: 10px;
    width: 18px;
    height: 18px;
}

/* 
 * SEARCH PAGE
 */

 /* Button bar */
 .search-definition-widget .search-setting-table tbody:last-child div {
    justify-content: flex-end;
    gap: 8px;
 }

.search-result-widget-content .note-path .path-bracket {
    display: inline;
}

.search-result-widget-content .note-path {
    opacity: 0.75;
    font-weight: normal;
}

/*
 * SQL CONSOLE
 */

/* Table buttons */

.sql-table-schemas-widget .sql-table-schemas button {
    --color: var(--main-text-color);
    --background: var(--card-background-color);

    display: inline-block;
    box-shadow: 2px 2px 2px var(--card-shadow-color);
    margin-top: 4px;
    vertical-align: baseline;
    border: unset;
    border-radius: 12px;
    padding: 2px 12px;
    background: var(--background) !important;
    color: var(--color) !important;
    line-height: unset;
}

.sql-table-schemas-widget .sql-table-schemas button:hover,
.sql-table-schemas-widget .sql-table-schemas button:active,
.sql-table-schemas-widget .sql-table-schemas button:focus-visible {
    --background: var(--card-background-press-color);
    --color: var(--main-text-color);
}

/*
 * NOTE MAP
 */

.note-detail-note-map .fixnodes-type-switcher .tn-tool-button,
.note-map-widget .fixnodes-type-switcher .tn-tool-button {
    padding: unset;
}

 .note-detail-note-map .fixnodes-type-switcher .tn-tool-button.toggled {
    color: var(--tab-close-button-hover-background);
}

/*
 * EMPTY NOTE PAGE
 */

/* The container */
div.note-detail-empty {
    max-width: 70%;
    margin: 50px auto;
}

/* The search results list */
.note-detail-empty span.aa-dropdown-menu {
    margin-top: 1em;
    border: unset;
}

/* NOTE ATTACHMENTS */

.attachment-list div.links-wrapper {
    font-size: unset;
}

/*
 * OPTIONS PAGES
 */
 
 :root {
    --options-card-min-width: 500px;
    --options-card-max-width: 900px;
    --options-card-padding: 17px;
    --options-title-font-size: 1rem;
    --options-title-offset: 13px;
}
/* Create a gap at the top of the option pages */
.note-detail-content-widget-content.options>*:first-child {
    margin-top: var(--options-first-item-top-margin, 1em);
}

/* Create a gap at the bottom of option pages */
.note-detail-content-widget-content.options::after {
    display: block;
    content: "";
    height: 1em;
}

/* Add a gap between consecutive buttons */
.note-detail-content-widget-content.options button.btn + button.btn {
    margin-inline-start: 8px;
}

.note-detail-content-widget-content.options:has(.shortcuts-options-section)::after {
    height: 0;
}

.options-section:not(.tn-no-card) {
    margin: auto;    
    border-radius: 12px;
    border: 1px solid var(--card-border-color) !important;
    box-shadow: var(--card-box-shadow);
    background: var(--card-background-color);
    padding: var(--options-card-padding);
    margin-bottom: calc(var(--options-title-offset) + 26px) !important;
}

body.desktop .option-section:not(.tn-no-card) {
    min-width: var(--options-card-min-width);
    max-width: var(--options-card-max-width);
}

.note-detail-content-widget-content.options {
    --default-padding: 15px;
    padding-top: calc(var(--default-padding) + var(--options-title-offset) + var(--options-title-font-size));
    padding-bottom: var(--default-padding);
}

.options-section:not(.tn-no-card) h4 {
    font-size: var(--options-title-font-size);
    font-weight: bold;
    color: var(--launcher-pane-text-color);
    margin-top: calc(-1 * var(--options-card-padding) - var(--options-title-font-size) - var(--options-title-offset)) !important;
    margin-bottom: calc(var(--options-title-offset) + var(--options-card-padding)) !important;
    margin-inline-start: calc(-1 * var(--options-card-padding));
}

.options-section:not(.tn-no-card) h5 {
    font-size: var(--options-title-font-size);
    font-weight: bold;
    margin-top: 1em !important;
    margin-bottom: unset !important;
}

.options-section:not(.tn-no-card) h5:first-of-type {
    margin-top: unset !important;
}

.options-section hr {
    --bs-border-width: 2px;

    margin-inline-start: calc(var(--options-card-padding) * -1);
    margin-inline-end: calc(var(--options-card-padding) * -1);
    opacity: 1;
    color: var(--root-background);
}

.options-section p:last-of-type:not(:first-of-type),
.options-section h4 + p:last-child,
.options-section .existing-anonymized-databases {
    margin-bottom: 0;
}

.options-section .form-group {
    margin-bottom: 1em;
}

.options-section .form-group:last-child {
    margin-bottom: 0;
}

.options-section ul {
    margin: 0;
    padding: 0;
    margin-bottom: 1em;
}

.options-section label:not(.tn-checkbox):not(.tn-radio) {
    margin-bottom: 6px;
}

.options-section .alert {
    margin-bottom: 8px;
    background: var(--alert-bar-background) !important;
    border-radius: 8px;
    font-size: .85em;
}

nav.options-section-tabs {
    min-width: var(--options-card-min-width);
    max-width: var(--options-card-max-width);
    margin: auto;
}

nav.options-section-tabs .nav-tabs {
    border-bottom: 0;
}

nav.options-section-tabs + .options-section {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Appeareance */

.main-font-size-input-group,
.tree-font-size-input-group,
.detail-font-size-input-group,
.monospace-font-size-input-group {
    width: fit-content;
}

/* Shortcuts */

.note-detail-content-widget-content:has(.shortcuts-options-section) {
    /* Allow the card to extend on the full width of the parent */
    --options-card-max-width: 100%;

    /* Remove top padding for the options page */
    --options-title-offset: 0px;
    --options-title-font-size: 0px;

    /* Remove the top margin of the first item */
    --options-first-item-top-margin: 0;
}

.shortcuts-options-section h4 {
    display: none;
}

/* Group heading */
.shortcuts-options-section .separator {
    padding-top: 2em;
    padding-bottom: 1em;
    background: transparent !important;
    font-weight: 500;
}

/* Simulates the underline for group headings */
.shortcuts-options-section .separator::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
}

/* ETAPI */

.etapi-options-section div {
    height: auto !important;
}